#sea-search-input {
  display: none;
}

.DocSearch {
  --docsearch-primary-color: var(--sea-color-primary);
  --docsearch-highlight-color: var(--sea-color-primary);
  --docsearch-searchbox-shadow: none;
  --docsearch-logo-color: var(--sea-color-primary);

  --docsearch-text-color: var(--sea-color-text-1);
  --docsearch-muted-color: var(--sea-color-text-2);
  --docsearch-searchbox-focus-background: transparent;
  --docsearch-key-gradient: transparent;
  --docsearch-key-shadow: none;
  --docsearch-modal-background: var(--sea-color-bg-soft);
  --docsearch-footer-background: var(--sea-color-bg);
}

.DocSearch .cls-1,
.DocSearch .cls-2 {
  fill: var(--sea-color-primary);
}

.DocSearch-Button {
  margin: 0;
}

.DocSearch-Form {
  border: 1px solid var(--sea-color-primary);
  background-color: var(--sea-color-white);
}

html[theme=dark] .DocSearch {
  --docsearch-modal-shadow: none;
  --docsearch-footer-shadow: none;
  --docsearch-logo-color: var(--sea-color-text-2);
  --docsearch-hit-background: var(--sea-color-mute);
  --docsearch-hit-color: var(--sea-color-text-2);
  --docsearch-hit-shadow: none;
  --docsearch-searchbox-background: transparent;
}

html[theme=dark] .DocSearch-Footer {
  border-top: 1px solid var(--sea-color-divider);
}

html[theme=dark] .DocSearch-Form {
  background-color: var(--sea-color-mute);
}

/* 调整PC端搜索框样式 */
@media (min-width: 768px) {
  .DocSearch-Button {
    justify-content: flex-start;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 10px 0 12px;
    width: 100%;
    height: 40px;
    background-color: var(--sea-color-bg-alt);
  }

  .DocSearch-Button:hover {
    border-color: var(--sea-color-primary);
    background: var(--sea-color-bg-alt);
  }

  /* 设置 搜索图标 样式 */
  .DocSearch-Button .DocSearch-Search-Icon {
    top: 1px;
    margin-right: 8px;
    width: 14px;
    height: 14px;
    color: var(--sea-color-text-2);
  }

  .DocSearch-Button:hover .DocSearch-Search-Icon {
    color: var(--sea-color-text-1);
  }

  /* 设置 Placeholder 样式 */
  .DocSearch-Button .DocSearch-Button-Placeholder {
    display: inline-block;
    padding: 0 16px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--sea-color-text-2);
    transition: color 0.5s;
  }

  .DocSearch-Button:hover .DocSearch-Button-Placeholder {
    color: var(--sea-color-text-1);
  }

  /* <Ctrl K> 快捷键按钮样式 */
  .DocSearch-Button .DocSearch-Button-Keys {
    display: flex;
    align-items: center;
  }

  .DocSearch-Button .DocSearch-Button-Key {
    display: block;
    margin: 2px 0 0 0;
    border: 1px solid var(--sea-color-divider);
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding-left: 6px;
    min-width: 0;
    width: auto;
    height: 22px;
    line-height: 22px;
    font-family: var(--sea-font-family-code);
    font-size: 12px;
    font-weight: 500;
    transition: color 0.5s, border-color 0.5s;
  }

  .DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key {
    border-right: 1px solid var(--sea-color-divider);
    border-left: none;
    border-radius: 0 4px 4px 0;
    padding-left: 2px;
    padding-right: 6px;
  }

  .DocSearch-Button .DocSearch-Button-Key:first-child {
    font-size: 1px;
    letter-spacing: -12px;
    color: transparent;
  }

  .DocSearch-Button .DocSearch-Button-Key:first-child>* {
    display: none;
  }

  .DocSearch-Button .DocSearch-Button-Key:first-child:after {
    content: "Ctrl";
    font-size: 12px;
    letter-spacing: normal;
    color: var(--docsearch-muted-color);
  }
}

@media (max-width: 768px) {

  /* 修复移动端搜索表单定位问题 */
  .DocSearch-Container {
    position: fixed;
  }
}